package com.xbb.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xbb.entity.Role;
import com.xbb.entity.Rolemodules;
import com.xbb.mapper.RoleMapper;
import com.xbb.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.validation.Valid;
import java.util.List;

@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper,Role> implements RoleService {

    @Autowired
    RoleMapper roleMapper;

    @Override
    public List<Role> getRoleName(@Valid Role role) {
        return roleMapper.getRoleName(role);
    }

    @Override
    public List<Rolemodules> getRolesContainsMod(Integer id) {
        return roleMapper.getRolesContainsMod(id);
    }


}
